package com.cola.demo1.web;

import com.cola.demo1.service.UserService;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

/**
 * @Grup:com.cola.demo2.web
 * @Auther:cola
 * @Data:2021/4/19-2021-04-0:00
 * @version:1.0
 */
//@Component
@Controller//代替Component,没有区别,语义更明确
public class UserController {
    @Resource(name = "userServiceNormal")
    private UserService userService;

    public void  add(){
        userService.add();
    }
}
